package com.ruoyi.yl.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.domain.SysNotice;
import com.ruoyi.common.mapper.SysNoticeMapper;
import com.ruoyi.yl.service.ISysNoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 公告 服务层实现
 * 
 * @author ruoyi
 */
@Slf4j
@Service
public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper,SysNotice> implements ISysNoticeService
{

    @Override
    public List<SysNotice> selectNoticeListByType(String type) {

        return this.getBaseMapper().selectList(Wrappers.<SysNotice>lambdaQuery()
                .eq(SysNotice::getNoticeType,type)
                .eq(SysNotice::getStatus,0)
        );
    }
}
